package com.lagou.edu.feign;

import com.lagou.edu.pojo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @Author 梅松
 * @Date 2021/10/21 18:58
 */
@FeignClient(value = "lagou-service-code",path = "/code")
@Service
public interface CodeFeign {

    @GetMapping("/create/{email}")
    public Result create(@PathVariable String email);

    @GetMapping("/checkCode/{email}/{code}")
    public Result checkCode(@PathVariable String email,@PathVariable String code);

    @DeleteMapping("/deleteCode/{email}")
    public Result deleteCode(@PathVariable String email);
}
